# Maintainer: Laurent Bercot <ska-devel@skarnet.org>
# Contributor: Laurent Bercot <ska-devel@skarnet.org>
pkgname=s6-linux-init
pkgver=1.0.4.2
pkgrel=0
pkgdesc="Set of tools to create and run an s6-based init system"
url="http://skarnet.org/software/$pkgname/"
arch="all"
license="ISC"
options="!check"
makedepends="skalibs-dev execline-dev s6-dev linux-headers"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="http://skarnet.org/software/s6-linux-init/s6-linux-init-$pkgver.tar.gz"

build() {
	./configure \
		--enable-shared \
		--enable-static \
		--disable-allstatic \
		--prefix=/usr \
		--libdir=/usr/lib \
		--skeldir=/etc/s6-linux-init/skel
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

doc() {
	default_doc
	mkdir -p "$subpkgdir"/usr/share/doc
	cp -a "$builddir"/doc "$subpkgdir"/usr/share/doc/$pkgname
}

sha512sums="31dfe6911f6de527c43120097bd711cfb84cdec6f056ccaa03d48a1bcecb852caacdbaabddf0188ea30c4827abe3293acb8ebff8dfe80ea8665934802fac0e53  s6-linux-init-1.0.4.2.tar.gz"
